package com.ihr360.insurance.dao;

import com.ihr360.insurance.model.dto.benefits.CompanyBenefit;
import com.ihr360.rest.reposity.SimpleRestReposity;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

import java.util.Collection;
import java.util.List;

@RepositoryRestResource
public interface CompanyBenefitReposity extends SimpleRestReposity<CompanyBenefit, Long>, PagingAndSortingRepository<CompanyBenefit, Long> {

    List<CompanyBenefit> findAllByCompanyIdAndEnabled(String companyId, boolean enabled);

    int countByCompanyIdAndIdInAndName(String companyId, Collection<Long> ids, String name);

    List<CompanyBenefit> findAllByIdIn(Collection<Long> ids);
}